<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateServiceConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('service_config', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('service_id')->index()->comment('服务站id');
            $table->string('to_work')->nullable()->comment('上班时间');
            $table->string('off_work')->nullable()->comment('下班时间');
            $table->decimal('courier_price', 10, 2)->default(0.00)->comment('快递员每单费用');
            $table->decimal('service_price', 10, 2)->default(0.00)->comment('服务站费用');
            $table->decimal('self_service_price', 10, 2)->default(0.00)->comment('自助服务网点提成');
            $table->decimal('courier_overweight', 10, 2)->default(0.00)->comment('取件员超重费用');
            $table->decimal('service_overweight', 10, 2)->default(0.00)->comment('服务站超重费用');
            $table->string('ebusiness_id')->nullable()->comment('EBusinessID');
            $table->string('app_key')->nullable()->comment('AppKey');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('service_config');
    }
}
